 $(document).ready(function(){ 
	$("#dim_block").css("width",$(document).width());
	$("#dim_block").css("height",$(document).height());
    $("#login_a").click(function(e){
        $("#login_box").css("visibility","visible");
		$("#register_box").css("visibility","hidden");
        e.stopPropagation();
    });
    $("#login_box").click(function(e){
        $("#login_box").css("visibility","visible");
        e.stopPropagation();
    });
    $("#register_a").click(function(e){
        $("#register_box").css("visibility","visible");
		$("#login_box").css("visibility","hidden");
		$("#dim_block").css("visibility","visible");
		// $("#dim_block").css("opacity","0.6");
        e.stopPropagation();
    });
    $("#register_box").click(function(e){
        $("#register_box").css("visibility","visible");
        e.stopPropagation();
    });

    $("body").click(function(e){
        $("#login_box").css("visibility","hidden");
        $("#register_box").css("visibility","hidden");
		$("#dim_block").css("visibility","hidden");
        e.stopPropagation();
    });

    $("#login_close_button").click(function(e){
        $("#login_box").css("visibility","hidden");
        e.stopPropagation();
    });
	
    $("#register_box_close").click(function(e){
        $("#register_box").css("visibility","hidden");
        $("#dim_block").css("visibility","hidden");
		// $("#dim_block").css("opacity","0");
        e.stopPropagation();
		return false;
    });

});

